<%-- 
    Document   : user-profile
    Created on : Feb 9, 2012, 8:37:14 AM
    Author     : PhucAn
--%>


<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Profile</title>
        
        <script type="text/javascript">
            $(document).ready(function(){
                $('#dob').datepicker();
            });
        </script>
    </head>
    <body>        
        <table class="form-table">
            <tr>
                <td>First name: </td>
                <td><input type="text" name="firstname" value="${user.firstName}"/></td>
                <td></td>
            </tr>
            <tr>
                <td>Last name: </td>
                <td><input type="text" name="lastname" value="${user.lastName}"/></td>
                <td></td>
            </tr>
            <tr>
                <td>Username: </td>
                <td><input type="text" name="username" value="${user.username}"/></td>
                <td></td>
            </tr>
            <tr>
                <td>Gender: </td>
                <td><input type="radio" name="gender" value="male" ${user.gender ? "checked='checked'" : ""}/> Male - <input type="radio" name="gender" value="female"${!user.gender ? "checked='checked'" : ""}/> Female</td>
                <td></td>
            </tr>
            <tr>
                <td>Date of birth:</td>
                <td><input type="text" name="dob" id="dob" value='<fmt:formatDate value="${user.dateOfBirth}" pattern="MM/dd/yyyy"/>' /></td>
                <td></td>
            </tr><tr>
                <td>Email:</td>
                <td><input type="text" name="email" value="${user.email}"/></td>
                <td></td>
            </tr>
            <tr>
                <td>Registered date:</td>
                <td><fmt:formatDate value="${user.registeredDate}" pattern="MM/dd/yyyy" /></td>
                <td></td>
            </tr>
            <tr>
                <td></td>
                <td><intput type="submit" name="submit" value="Save change"/></td>
        <td></td>
    </tr>


</table>
</body>
</html>
